chore(dev): Claude hooks, AGENTS.md, dev-shell search tooling - #59
Open
mfw78 wants to merge 2 commits into
Open
Conversation
Add the shared Claude Code configuration this repo had no equivalent of, plus the two dev-shell tools the agent workflow depends on. .claude/settings.json wires three hooks: - rustfmt-on-edit.sh formats each edited .rs file with edition 2024, matching the workspace edition. - content-lint.sh blocks an edit that adds an em-dash to a .rs or .md file, which is the house rule the repo already follows by hand. - nextest-on-stop.sh runs cargo nextest for the crates with uncommitted .rs changes at the end of a turn. Each hook is a no-op when its tool is missing, so nothing changes outside the Nix dev shell. AGENTS.md is the agent contract, and CLAUDE.md is a symlink to it. It is written in ASD-STE100 Simplified Technical English with one sentence per line. The content is grounded in README.md, Cargo.toml, the justfile, and .github/workflows/ci.yml: no new roadmap or architecture claims. flake.nix gains ripgrep and ast-grep in the devShell. cargo-nextest was already there. Nothing is removed. .config/nextest.toml sets a slow-timeout so a hung test fails by name after five minutes instead of consuming the CI job timeout. The justfile and the CI workflow are unchanged: they already run cargo nextest run and a separate cargo test --doc. .gitignore previously ignored all of .claude/. It now tracks settings.json and hooks/ while keeping settings.local.json and worktrees/ out of the repository. AI Assistance: Claude Opus used for the hooks, AGENTS.md, and flake change
content-lint scanned the whole file, so any edit to a file that already carried an em-dash was blocked even when the edit added none. That made an existing README or comment effectively uneditable. Compare the count against the committed version of the same file and block only on a net increase. A file that already carries the token stays editable, and adding one is still blocked. AI Assistance: Claude Opus used for this fix.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the shared Claude Code tooling and the agent contract this repository was missing. No production code, no CI change.
.claude/hooks and settings.settings.jsonwires three hooks copied from an already-tested sibling repo:rustfmt-on-edit.shformats each edited.rsfile with--edition 2024(verified against[workspace.package] editioninCargo.toml),content-lint.shblocks an edit that adds an em-dash to a.rsor.mdfile, andnextest-on-stop.shrunscargo nextest runfor the crates with uncommitted.rschanges at the end of a turn. Each hook exits early whenrustfmt,cargo, orcargo-nextestis missing, so it does nothing outside the Nix dev shell.AGENTS.md, withCLAUDE.mdas a symlink to it. Written in ASD-STE100 Simplified Technical English with one sentence per line. Every claim is grounded inREADME.md,Cargo.toml,crates/, thejustfile, and.github/workflows/ci.yml: the venue-agnostic runtime that ships no venue payload, the extension seam (extensions.tomlrows synthesized bynexum-world), the crate layout, edition 2024 with the flake-pinned Rust 1.94.0 toolchain that matches CI, the real just recipes,cargo nextest runplus a separatecargo test --doc, and fmt and clippy as the pre-commit gate. No roadmap or architecture was invented.flake.nix. Addsripgrepandast-grepto the devShell with a short comment.cargo-nextestwas already present, and nothing was removed..config/nextest.toml. New file withslow-timeout = { period = "60s", terminate-after = 5 }, so a hung test fails by name after five minutes instead of eating the CI job timeout. Thejustfileandci.ymlare untouched..gitignore..claude/was ignored wholesale. It is now.claude/*with negations forsettings.jsonandhooks/, and explicit ignores forsettings.local.jsonandworktrees/. Verified withgit add -A -nthat the shared files stage and the personal ones do not.Validated locally:
jq -e .on the settings, atomllibparse of the nextest config,nix-instantiate --parse flake.nix,bash -non each hook, a live check thatcontent-lint.shblocks an em-dash payload and passes clean text, and an em-dash scan overAGENTS.mdthat finds nothing.Closes #58
AI Assistance: Claude Opus used for the hooks wiring, AGENTS.md, and the flake change.